package com.example2;

/**
 * @author Yancy
 * @program springioctest
 * @create 2021-03-03
 */
public class Test02 {

  public static void main(String[] args) {
    //
    // 通过new来创建的两个Integer对象
    Integer a = new Integer(3);
    Integer d = new Integer(3);

    Integer b = 3;
    int c = 3;
    Integer e = 3;

    Long l = 3L;

    // false两个引用没有引用同一对象
    System.out.println(a == b);
    // false 两个通过new创建的Integer对象也不是同一个引用
    System.out.println(a == d);
    // true b自动拆箱成int类型再和c比较
    System.out.println(c == b);
    // ture
    System.out.println(c == a);
    // ture
    System.out.println(b == e);

    System.out.println(a.equals(l));

    Integer ai = 127;
    Long bl = 127L;

    // System.out.println(ai==bl);

  }

  public static Test02 a(String str) {
    System.out.println("....");
    Test02 test02 = new Test02();
    return test02;
  }

  public static int a(int a) {
    return 0;
  }
}
